OAuth Authentication

Published Date: 28-08-2024

Read Time:

Configure Remote Site Settings

  1. Navigate to the ‘Setup’ page from your Salesforce instance. In the ‘Quick Find’ box, search for ‘Remote Site Settings’ and click on it from the search results.

  1. Click ‘New Remote Site’ to add the remote site.

Create a Remote Site for the Jira Instance

  1. In this step, you will create a Remote Site for your Jira instance to establish a secure connection between Salesforce and Jira.

  • Remote Site Name: Enter a descriptive name for the Jira Remote Site.

  • Remote Site URL: This URL is crucial for enabling communication between Salesforce and Jira.

Create a Remote Site for the Salesforce Instance

  1. In this step, you will create another remote site for your Salesforce instance to facilitate secure communication, authentication, and seamless integration within the Salesforce environment.

  • Remote Site Name: Provide a meaningful name for the Salesforce Remote Site.

  • Remote Site URL: Enter the URL of your Salesforce instance.

Create Application Links on the Jira Side

  1. Log into your Jira system as a user with 'Jira Administrator' permissions.

  2. Click on the Gear (settings) icon.

  3. Under the Settings drop-down menu, click ‘System’.

  1. Click ‘Search Jira admin’.

  1. Enter ‘application’ in the search bar and click ‘Application links’ from the search results.

  1. Click on ‘Create link’.

  2. Enter your Salesforce Org’s URL in the field and click ‘Create new link’.

  1. A new window will open to confirm the ‘New URL’. Click ‘Continue’.

  1. Fill in the details like ‘Application Name’ and select ‘Generic Application’ as the ‘Application Type’. Click ‘Continue’.

  1. A new application link will be created.

  1. Next is setting up the Incoming Authentication. Click ‘Edit’ (as highlighted in the screenshot below).

  1. Enter ‘Sinergify’ in the ‘Consumer Key’ and’ Consumer Name’ fields.

  1. Insert the public key in the ‘Public Key’ field.

    Note:

    Please check this reference Document for Public/Private keys.

    (Please save the Private key also as it will be required later in Step 20)

  1. Add your ‘Consumer Callback URL’. The URL should be in the following format. SalesforceOrgURL+’/apex/Grz_Sf__AuthPage?status=’+SalesforceOrgID+’&instanceUrl=’+Jira instance Url

    E.g.

    https://grazitti3e-dev-ed.my.salesforce.com/apex/Grz_Sf__AuthPage?Status=00D5g000004FBtEEAW&instanceURL=https://sinergify.atlassian.net

  1. Click ‘Save’. The status of the application link will be updated to ‘Configured’.

  1. Go to the Authentication tab of the Admin Settings (Sinergify app) and select the ‘OAuth’ tab and fill in the details below.

  • Jira Name: Provide your Jira instance Name.

  • Jira URL: Provide your Jira instance URL.

  • Call back URL: Enter the Call back URL in the SalesforceOrgURL+’/apex/Grz_Sf__AuthPage?status=’+SalesforceOrgID+’&instanceUrl=’+Jira instance Url format.

  • Consumer Key: Enter the Consumer key used in the Application link.

  • Private Key: Enter the Private key generated in step 17 above.

  • Activate Content Header Parameter: Enable the toggle button to authenticate with Google SSO, facilitating single sign-on using Google credentials.

    Key Consideration Points.

  • A consumer key must be one word only, as Jira does not support more than one word in a consumer key. See the reference Document.
  • Refresh Token: A refresh token helps you re-validate your connection. It is particularly useful when the token expires or is revoked on the Jira side. This can also be used to authenticate the Salesforce side with a different Jira Integration user if needed.
  1. Select the Jira software - Server or Cloud.

  1. Toggle to make this Jira instance your default Jira instance.

  1. Click ‘Save'.

  1. A Pop-up will appear on your screen. Log in using your Jira credentials.

    Note. Ensure that pop-ups are not blocked.

  1. After logging in, a new window will appear asking for the ‘Read’ and ‘Write’ permissions. Click ‘Allow’ to share access token else click ‘Deny’.

  1. A new window will appear on your screen asking you to allow or deny the access.

  1. If allowed, the access token will be shared and saved automatically in Salesforce and the admin page will reload automatically.

  1. After this process is complete, you will be able to view the Integration user details. Refer to the screenshot below for reference. Please ensure the status is set to Active. If it is not, enable the toggle button.